package com.legsem.voltdb.test.server;

import org.voltdb.ProcInfo;
import org.voltdb.SQLStmt;
import org.voltdb.VoltProcedure;
import org.voltdb.VoltTable;

@ProcInfo(partitionInfo = "MASTERDOCS.USER_LOGIN: 2", singlePartition = true)
public class Insert extends VoltProcedure {

    public final SQLStmt sql = new SQLStmt(
            "INSERT INTO MASTERDOCS VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);");

    public VoltTable[] run(String app_name, String source_name,
            String user_login, String md, int md_size, long refresh_time,
            String errors, String metadata, String metadata_sha1)
            throws VoltAbortException {

        voltQueueSQL(sql, app_name, source_name, user_login, md, md_size,
                refresh_time, errors, metadata, metadata_sha1);
        voltExecuteSQL();
        return null;
    }
}
